package com.demo.algorithm.binary04;

/**
 * Author:       zhangshaoyang
 * Description:  二分算法套路模板
 * Date:         2021/6/8 8:35 上午
 */
public class BinaryTemplate {
    int binarySearch(int[] nums, int target) {
//        int left = 0, right =...;
//        while (...){
//            int mid = left + (right - left) / 2;
//            if (nums[mid] == target) {
//                ...
//            } else if (nums[mid] < target) {
//                left = ...
//            } else if (nums[mid] > target) {
//                right = ...
//            }
//        }
//        return ...;
        return 0;
    }
}
